<!--
*Author：富行天下团队
 *
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mall/V_small_order_item.js此处编写
 -->
<template>
  <div>
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields"
      :editFormFileds="editFormFields" :editFormOptions="editFormOptions"
      :searchFormFields="searchFormFields" :searchFormFileds="searchFormFields"
      :searchFormOptions="searchFormOptions" :table="table" :extend="extend">
    </view-grid>
  </div>
</template>

<script>
import extend from "@/extension/mall/V_guestroom.js";
import ViewGrid from "@/components/basic/ViewGrid.vue";
var vueParam = {
  components: {
    ViewGrid,
  },
  data() {
    return {
      table: {
        key: "id",
        footer: "Foots",
        cnName: "客房明细报表",
        name: "V_guestroom",
        url: "/V_guestroom/",
        sortName: "order_number",
        paginationSize: 99999999,
        paginationHide: true,
      },
      extend: extend,
      editFormFields: {},
      editFormOptions: [],
      searchFormFields: {
        title: "",
        playStartDate: "",
        order_number: "",
        createDate: "",
        status: "",
        distributorCode: "",
        supplierCode: "",
        type: "",
        takeTime: "",
      },
      searchFormOptions: [
        [
          { title: "订单号", field: "order_number", type: "like" },
          { title: "商品名称", field: "title", type: "like" },
          { title: "创建时间", field: "createDate", type: "datetime" },
        ],
        [
          {
            dataKey: "order_shop",
            data: [],
            title: "票状态",
            field: "status",
            type: "select",
          },
          {
            dataKey: "distributorList",
            data: [],
            title: "分销商名称",
            field: "distributorCode",
            type: "select",
          },
          {
            dataKey: "mall_supplier",
            data: [],
            title: "供应商名称",
            field: "supplierCode",
            type: "select",
          },
        ],
        [
          { title: "内部流水号", field: "internal_id_fk", type: "like" },
          { title: "取票码", field: "ticketsCode", type: "like" },
          { title: "PMS确认号", field: "pmsconfirmationNo", type: "like" },
        ],
        [
          { title: "使用人姓名", field: "name", type: "like" },
          { title: "使用人电话", field: "phone", type: "like" },
          { title: "票状态时间", field: "takeTime", type: "datetime" },
        ],
      ],
      columns: [
        {
          field: "createDate",
          title: "创建时间",
          type: "datetime",
          width: 200,
          align: "left",
          sortable: true,
        },
        {
          field: "order_number",
          title: "订单号",
          type: "string",
          width: 220,
          align: "left",
        },
        {
          field: "ticketsCode",
          title: "取票码",
          type: "string",
          width: 120,
          align: "left",
        },
        //  {field:'childrenNumber',title:'订单子项单号',type:'string',width:220,align:'left'},
        {
          field: "pmsconfirmationNo",
          title: "PMS确认号",
          type: "string",
          width: 120,
          align: "left",
        },
        {
          field: "internal_id_fk",
          title: "内部流水号",
          type: "string",
          width: 200,
          align: "left",
        },
        {
          field: "playStartDate",
          title: "游玩开始时间",
          type: "datetime",
          width: 280,
          align: "left",
          sortable: true,
        },
        {
          field: "playEndDate",
          title: "游玩结束时间",
          type: "datetime",
          width: 180,
          align: "left",
          sortable: true,
        },
        {
          field: "name",
          title: "使用人姓名",
          type: "string",
          width: 120,
          align: "left",
        },
        {
          field: "phone",
          title: "使用人电话",
          type: "string",
          width: 160,
          align: "left",
        },
        {
          field: "title",
          title: "商品名称",
          type: "string",
          width: 200,
          align: "left",
          sortable: true,
        },
        {
          field: "settlement_total_fee",
          title: "合计金额",
          type: "decimal",
          width: 160,
          align: "left",
        },
        {
          field: "supplierCode",
          title: "供应商名称",
          type: "string",
          bind: { key: "mall_supplier", data: [] },
          width: 120,
          align: "left",
        },
        {
          field: "status",
          title: "票状态",
          type: "bigint",
          bind: { key: "order_shop", data: [] },
          width: 80,
          require: true,
          align: "left",
        },
        {
          field: "distributorCode",
          title: "分销商名称",
          type: "string",
          bind: { key: "distributor_name", data: [] },
          width: 120,
          align: "left",
        },
      ],
      detail: {
        cnName: "#detailCnName",
        columns: [],
        sortName: "",
        key: "",
      },
    };
  },
};
export default vueParam;
</script>
